package com.jingdianjichi.auth.common.enums;

import lombok.Getter;

@Getter
public enum IsDeletedCodeEnum {

    DELETED(1, "已删除"),
    UN_DELETED(0, "未删除");

    public int code;
    public String desc;

    IsDeletedCodeEnum(int code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static IsDeletedCodeEnum getByCode(int codeVal){
        for(IsDeletedCodeEnum resultCodeEnum: IsDeletedCodeEnum.values()){
            if(resultCodeEnum.code == codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }

}
